package org.cos.verification.verifier;

import org.shellex.javame.utility.Screen;

public class ScreenFactory {
	private static ScreenFactory instance = null; 
	public static ScreenFactory getInstance()
	{
		if(instance == null)
			instance = new ScreenFactory();
		return instance;
	} 

	public Screen Create(int type){
		Screen screen = null;
		if (type == ScreenType.MAIN){
			screen =  MainScreen.getInstance();
		} else if (type == ScreenType.RULE_MGR){
			screen =  RuleMgrScreen.getInstance();
		} else if (type == ScreenType.RULE_VIEWER) {
			screen = RuleViewerScreen.getInstance();
		} else if (type == ScreenType.RULE_EDTIOR) {
			screen = RuleEditorScreen.getInstance();
		} else if (type == ScreenType.OF_DIALOG) {
			screen = OpenFileScreen.getInstance();
		} else if (type == ScreenType.CHK_PROG) {
			screen = CheckProgressScreen.getInstance();
		} else {
			screen = null;
		} 
		return screen;
	}
}
